package com.companion.companion.service.impl;

import java.util.List;

import com.companion.companion.domain.Carerequest;
import com.companion.companion.mapper.CarerequestMapper;
import com.companion.companion.service.ICarerequestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 用户陪护需求Service业务层处理
 * 
 * @author zly
 * @date 2025-05-06
 */
@Service
public class CarerequestServiceImpl implements ICarerequestService
{
    @Autowired
    private CarerequestMapper carerequestMapper;

    /**
     * 查询用户陪护需求
     * 
     * @param requestId 用户陪护需求主键
     * @return 用户陪护需求
     */
    @Override
    public Carerequest selectCarerequestByRequestId(Long requestId)
    {
        return carerequestMapper.selectCarerequestByRequestId(requestId);
    }

    /**
     * 查询用户陪护需求列表
     * 
     * @param carerequest 用户陪护需求
     * @return 用户陪护需求
     */
    @Override
    public List<Carerequest> selectCarerequestList(Carerequest carerequest)
    {
        return carerequestMapper.selectCarerequestList(carerequest);
    }

    /**
     * 新增用户陪护需求
     * 
     * @param carerequest 用户陪护需求
     * @return 结果
     */
    @Override
    public int insertCarerequest(Carerequest carerequest)
    {
        return carerequestMapper.insertCarerequest(carerequest);
    }

    /**
     * 修改用户陪护需求
     * 
     * @param carerequest 用户陪护需求
     * @return 结果
     */
    @Override
    public int updateCarerequest(Carerequest carerequest)
    {
        return carerequestMapper.updateCarerequest(carerequest);
    }

    /**
     * 批量删除用户陪护需求
     * 
     * @param requestIds 需要删除的用户陪护需求主键
     * @return 结果
     */
    @Override
    public int deleteCarerequestByRequestIds(Long[] requestIds)
    {
        return carerequestMapper.deleteCarerequestByRequestIds(requestIds);
    }

    /**
     * 删除用户陪护需求信息
     * 
     * @param requestId 用户陪护需求主键
     * @return 结果
     */
    @Override
    public int deleteCarerequestByRequestId(Long requestId)
    {
        return carerequestMapper.deleteCarerequestByRequestId(requestId);
    }
}
